const rules =  {
    name: [
      { required: true, message: '请输入产品名称', trigger: 'change' },
      { min: 3, max: 20, message: '长度在 3 到 20 个字符', trigger: 'change' }
    ],
    price: [
        { required: true, type: 'number', message: '输入合法价格' },
    ],
    "type.id":[
      { required: true, message: '请选择产品类型', trigger: 'change' }
    ],
    description: [
        { required: true, message: '请输入产品描述', trigger: 'change' },
        { min: 3, max: 20, message: '长度在 3 到 25 个字符', trigger: 'change' }
    ]
  }
    
  export default rules